/*
Copyright (c) 2019 Alibaba Group Holding Limited

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

*/
`include "ascon_define.v"

module is_bus_top(
 input wire  [31:0] cpu_hmain1_m0_haddr,
 input wire  [2 :0] cpu_hmain1_m0_hburst,
 input wire  [3 :0] cpu_hmain1_m0_hprot,
 input wire  [2 :0] cpu_hmain1_m0_hsize,
 input wire  [1 :0] cpu_hmain1_m0_htrans,
 input wire  [31:0] cpu_hmain1_m0_hwdata,
 input wire         cpu_hmain1_m0_hwrite,
 input wire  [31:0] cpu_hmain1_m1_haddr,
 input wire  [2 :0] cpu_hmain1_m1_hburst,
 input wire  [3 :0] cpu_hmain1_m1_hprot,
 input wire  [2 :0] cpu_hmain1_m1_hsize,
 input wire  [1 :0] cpu_hmain1_m1_htrans,
 input wire  [31:0] cpu_hmain1_m1_hwdata,
 input wire         cpu_hmain1_m1_hwrite,
 input wire  [31:0] cpu_hmain1_m2_haddr,
 input wire  [2 :0] cpu_hmain1_m2_hburst,
 input wire  [3 :0] cpu_hmain1_m2_hprot,
 input wire  [2 :0] cpu_hmain1_m2_hsize,
 input wire  [1 :0] cpu_hmain1_m2_htrans,
 input wire  [31:0] cpu_hmain1_m2_hwdata,
 input wire         cpu_hmain1_m2_hwrite,
 output wire [31:0] hmain1_cpu_m0_hrdata,
 output wire        hmain1_cpu_m0_hready,
 output wire [1 :0] hmain1_cpu_m0_hresp,
 output wire [31:0] hmain1_cpu_m1_hrdata,
 output wire        hmain1_cpu_m1_hready,
 output wire [1 :0] hmain1_cpu_m1_hresp,
 output wire [31:0] hmain1_cpu_m2_hrdata,
 output wire        hmain1_cpu_m2_hready,
 output wire [1 :0] hmain1_cpu_m2_hresp,
 output wire [31:0] hmain1_ismc_s0_haddr,
 output wire [3 :0] hmain1_ismc_s0_hprot,
 output wire        hmain1_ismc_s0_hsel,
 output wire [2 :0] hmain1_ismc_s0_hsize,
 output wire [1 :0] hmain1_ismc_s0_htrans,
 output wire [31:0] hmain1_ismc_s0_hwdata,
 output wire        hmain1_ismc_s0_hwrite,
 output wire [31:0] hmain1_ree_bus_s10_haddr,
 output wire [2 :0] hmain1_ree_bus_s10_hburst,
 output wire [3 :0] hmain1_ree_bus_s10_hprot,
 output wire        hmain1_ree_bus_s10_hsel,
 output wire [2 :0] hmain1_ree_bus_s10_hsize,
 output wire [1 :0] hmain1_ree_bus_s10_htrans,
 output wire [31:0] hmain1_ree_bus_s10_hwdata,
 output wire        hmain1_ree_bus_s10_hwrite,
 output wire [31:0] hmain1_smc_s2_haddr,
 output wire [3 :0] hmain1_smc_s2_hprot,
 output wire        hmain1_smc_s2_hsel,
 output wire [2 :0] hmain1_smc_s2_hsize,
 output wire [1 :0] hmain1_smc_s2_htrans,
 output wire [31:0] hmain1_smc_s2_hwdata,
 output wire        hmain1_smc_s2_hwrite,
 output wire [31:0] hmain1_smc_s3_haddr,
 output wire [3 :0] hmain1_smc_s3_hprot,
 output wire        hmain1_smc_s3_hsel,
 output wire [2 :0] hmain1_smc_s3_hsize,
 output wire [1 :0] hmain1_smc_s3_htrans,
 output wire [31:0] hmain1_smc_s3_hwdata,
 output wire        hmain1_smc_s3_hwrite,
 output wire [31:0] hmain1_smc_s4_haddr,
 output wire [3 :0] hmain1_smc_s4_hprot,
 output wire        hmain1_smc_s4_hsel,
 output wire [2 :0] hmain1_smc_s4_hsize,
 output wire [1 :0] hmain1_smc_s4_htrans,
 output wire [31:0] hmain1_smc_s4_hwdata,
 output wire        hmain1_smc_s4_hwrite,
 input wire  [31:0] ismc_hmain1_s0_hrdata,
 input wire         ismc_hmain1_s0_hready,
 input wire  [1 :0] ismc_hmain1_s0_hresp,
 input wire  [31:0] ree_bus_hmain1_s10_hrdata,
 input wire         ree_bus_hmain1_s10_hready,
 input wire  [1 :0] ree_bus_hmain1_s10_hresp,
 output wire        main_dmemdummy0_intr,
 output wire        main_dummy0_intr,
 output wire        main_dummy1_intr,
 output wire        main_dummy2_intr,
 output wire        main_dummy3_intr,
 output wire        main_dummy4_intr,
 output wire        main_imemdummy0_intr,
 input wire         ispmu_dmemdummy0_hclk,
 input wire         ispmu_dmemdummy0_hrst_b,
 input wire         ispmu_dummy0_hclk,
 input wire         ispmu_dummy0_hrst_b,
 input wire         ispmu_dummy1_hclk,
 input wire         ispmu_dummy1_hrst_b,
 input wire         ispmu_dummy2_hclk,
 input wire         ispmu_dummy2_hrst_b,
 input wire         ispmu_dummy3_hclk,
 input wire         ispmu_dummy3_hrst_b,
 input wire         ispmu_dummy4_hclk,
 input wire         ispmu_dummy4_hrst_b,
 input wire         ispmu_hmain1_hclk,
 input wire         ispmu_hmain1_hrst_b,
 input wire         ispmu_imemdummy0_hclk,
 input wire         ispmu_imemdummy0_hrst_b,
 input wire         ispmu_mdummy0_hclk,
 input wire         ispmu_mdummy0_hrst_b,
 input wire         ispmu_mdummy1_hclk,
 input wire         ispmu_mdummy1_hrst_b,
 input wire         ispmu_mdummy2_hclk,
 input wire         ispmu_mdummy2_hrst_b,
 input wire         ispmu_mdummy3_hclk,
 input wire         ispmu_mdummy3_hrst_b,
 input wire  [31:0] smc_hmain1_s2_hrdata,
 input wire         smc_hmain1_s2_hready,
 input wire  [1 :0] smc_hmain1_s2_hresp,
 input wire  [31:0] smc_hmain1_s3_hrdata,
 input wire         smc_hmain1_s3_hready,
 input wire  [1 :0] smc_hmain1_s3_hresp,
 input wire  [31:0] smc_hmain1_s4_hrdata,
 input wire         smc_hmain1_s4_hready,
 input wire  [1 :0] smc_hmain1_s4_hresp,

 input wire  [31:0] iopmpcfg_rd1_i        ,
 input wire  [31:0] iopmpcfg_rd2_i        ,
 input wire  [31:0] iopmpcfg_rd3_i        ,
 output wire        iopmpcfg_node_clk_o   ,
 output wire        iopmpcfg_node_rstn_o  ,
 output wire        iopmpcfg_cfg_en_o     ,
 output wire [7:0]  iopmpcfg_node_addr_o  ,
 output wire        iopmpcfg_node_wen_o   ,
 output wire        iopmpcfg_node_ren_o   ,
 output wire [31:0] iopmpcfg_node_wdata_o 
);
wire    [3 :0]  cpu_hmain1_m0_hprot_tmp;
wire    [3 :0]  cpu_hmain1_m1_hprot_tmp;
wire    [3 :0]  cpu_hmain1_m2_hprot_tmp;
wire            mdummy3_hmain1_m3_hbusreq;
wire            mdummy3_hmain1_m3_hlock;
wire    [31:0]  dummy4_hmain1_s6_hrdata;
wire            dummy4_hmain1_s6_hready;
wire    [1 :0]  dummy4_hmain1_s6_hresp;
wire    [31:0]  dmemdummy0_hmain1_s5_hrdata;
wire            dmemdummy0_hmain1_s5_hready;
wire    [1 :0]  dmemdummy0_hmain1_s5_hresp;
wire    [31:0]  dummy0_hmain1_s7_hrdata;
wire            dummy0_hmain1_s7_hready;
wire    [1 :0]  dummy0_hmain1_s7_hresp;
wire    [31:0]  dummy1_hmain1_s8_hrdata;
wire            dummy1_hmain1_s8_hready;
wire    [1 :0]  dummy1_hmain1_s8_hresp;
wire    [31:0]  dummy2_hmain1_s9_hrdata;
wire            dummy2_hmain1_s9_hready;
wire    [1 :0]  dummy2_hmain1_s9_hresp;
wire    [31:0]  dummy3_hmain1_s11_hrdata;
wire            dummy3_hmain1_s11_hready;
wire    [1 :0]  dummy3_hmain1_s11_hresp;
wire            hmain1_cpu_m0_hgrant;
wire            hmain1_cpu_m1_hgrant;
wire            hmain1_cpu_m2_hgrant;
wire            hmain1_mdummy3_m3_hgrant;
wire    [31:0]  hmain1_mdummy3_m3_hrdata;
wire            hmain1_mdummy3_m3_hready;
wire    [1 :0]  hmain1_mdummy3_m3_hresp;
wire    [31:0]  hmain1_dummy4_s6_haddr;
wire    [2 :0]  hmain1_dummy4_s6_hburst;
wire    [3 :0]  hmain1_dummy4_s6_hprot;
wire            hmain1_dummy4_s6_hsel;
wire    [2 :0]  hmain1_dummy4_s6_hsize;
wire    [1 :0]  hmain1_dummy4_s6_htrans;
wire    [31:0]  hmain1_dummy4_s6_hwdata;
wire            hmain1_dummy4_s6_hwrite;
wire    [31:0]  hmain1_dmemdummy0_s5_haddr;
wire    [2 :0]  hmain1_dmemdummy0_s5_hburst;
wire    [3 :0]  hmain1_dmemdummy0_s5_hprot;
wire            hmain1_dmemdummy0_s5_hsel;
wire    [2 :0]  hmain1_dmemdummy0_s5_hsize;
wire    [1 :0]  hmain1_dmemdummy0_s5_htrans;
wire    [31:0]  hmain1_dmemdummy0_s5_hwdata;
wire            hmain1_dmemdummy0_s5_hwrite;
wire    [31:0]  hmain1_dummy0_s7_haddr;
wire    [2 :0]  hmain1_dummy0_s7_hburst;
wire    [3 :0]  hmain1_dummy0_s7_hprot;
wire            hmain1_dummy0_s7_hsel;
wire    [2 :0]  hmain1_dummy0_s7_hsize;
wire    [1 :0]  hmain1_dummy0_s7_htrans;
wire    [31:0]  hmain1_dummy0_s7_hwdata;
wire            hmain1_dummy0_s7_hwrite;
wire    [31:0]  hmain1_dummy1_s8_haddr;
wire    [2 :0]  hmain1_dummy1_s8_hburst;
wire    [3 :0]  hmain1_dummy1_s8_hprot;
wire            hmain1_dummy1_s8_hsel;
wire    [2 :0]  hmain1_dummy1_s8_hsize;
wire    [1 :0]  hmain1_dummy1_s8_htrans;
wire    [31:0]  hmain1_dummy1_s8_hwdata;
wire            hmain1_dummy1_s8_hwrite;
wire    [31:0]  hmain1_dummy2_s9_haddr;
wire    [2 :0]  hmain1_dummy2_s9_hburst;
wire    [3 :0]  hmain1_dummy2_s9_hprot;
wire            hmain1_dummy2_s9_hsel;
wire    [2 :0]  hmain1_dummy2_s9_hsize;
wire    [1 :0]  hmain1_dummy2_s9_htrans;
wire    [31:0]  hmain1_dummy2_s9_hwdata;
wire            hmain1_dummy2_s9_hwrite;
wire    [31:0]  hmain1_dummy3_s11_haddr;
wire    [2 :0]  hmain1_dummy3_s11_hburst;
wire    [3 :0]  hmain1_dummy3_s11_hprot;
wire            hmain1_dummy3_s11_hsel;
wire    [2 :0]  hmain1_dummy3_s11_hsize;
wire    [1 :0]  hmain1_dummy3_s11_htrans;
wire    [31:0]  hmain1_dummy3_s11_hwdata;
wire            hmain1_dummy3_s11_hwrite;
wire    [31:0]  hmain1_imemdummy0_s1_haddr;
wire    [2 :0]  hmain1_imemdummy0_s1_hburst;
wire    [3 :0]  hmain1_imemdummy0_s1_hprot;
wire            hmain1_imemdummy0_s1_hsel;
wire    [2 :0]  hmain1_imemdummy0_s1_hsize;
wire    [1 :0]  hmain1_imemdummy0_s1_htrans;
wire    [31:0]  hmain1_imemdummy0_s1_hwdata;
wire            hmain1_imemdummy0_s1_hwrite;
wire    [2 :0]  hmain1_ismc_s0_hburst;
wire            hmain1_mdummy0_m4_hgrant;
wire    [31:0]  hmain1_mdummy0_m4_hrdata;
wire            hmain1_mdummy0_m4_hready;
wire    [1 :0]  hmain1_mdummy0_m4_hresp;
wire            hmain1_mdummy1_m5_hgrant;
wire    [31:0]  hmain1_mdummy1_m5_hrdata;
wire            hmain1_mdummy1_m5_hready;
wire    [1 :0]  hmain1_mdummy1_m5_hresp;
wire            hmain1_mdummy2_m6_hgrant;
wire    [31:0]  hmain1_mdummy2_m6_hrdata;
wire            hmain1_mdummy2_m6_hready;
wire    [1 :0]  hmain1_mdummy2_m6_hresp;
wire    [2 :0]  hmain1_smc_s2_hburst;
wire    [2 :0]  hmain1_smc_s3_hburst;
wire    [2 :0]  hmain1_smc_s4_hburst;
wire    [31:0]  imemdummy0_hmain1_s1_hrdata;
wire            imemdummy0_hmain1_s1_hready;
wire    [1 :0]  imemdummy0_hmain1_s1_hresp;
wire    [31:0]  mdummy0_hmain1_m4_haddr;
wire    [2 :0]  mdummy0_hmain1_m4_hburst;
wire    [3 :0]  mdummy0_hmain1_m4_hprot;
wire    [3 :0]  mdummy0_hmain1_m4_hprot_tmp;
wire    [2 :0]  mdummy0_hmain1_m4_hsize;
wire    [1 :0]  mdummy0_hmain1_m4_htrans;
wire    [31:0]  mdummy0_hmain1_m4_hwdata;
wire            mdummy0_hmain1_m4_hwrite;
wire    [31:0]  mdummy1_hmain1_m5_haddr;
wire    [2 :0]  mdummy1_hmain1_m5_hburst;
wire    [3 :0]  mdummy1_hmain1_m5_hprot;
wire    [3 :0]  mdummy1_hmain1_m5_hprot_tmp;
wire    [2 :0]  mdummy1_hmain1_m5_hsize;
wire    [1 :0]  mdummy1_hmain1_m5_htrans;
wire    [31:0]  mdummy1_hmain1_m5_hwdata;
wire            mdummy1_hmain1_m5_hwrite;
wire    [31:0]  mdummy2_hmain1_m6_haddr;
wire    [2 :0]  mdummy2_hmain1_m6_hburst;
wire    [3 :0]  mdummy2_hmain1_m6_hprot;
wire    [3 :0]  mdummy2_hmain1_m6_hprot_tmp;
wire    [2 :0]  mdummy2_hmain1_m6_hsize;
wire    [1 :0]  mdummy2_hmain1_m6_htrans;
wire    [31:0]  mdummy2_hmain1_m6_hwdata;
wire            mdummy2_hmain1_m6_hwrite;
wire    [31:0]  mdummy3_hmain1_m3_haddr;
wire    [2 :0]  mdummy3_hmain1_m3_hburst;
wire    [3 :0]  mdummy3_hmain1_m3_hprot;
wire    [3 :0]  mdummy3_hmain1_m3_hprot_tmp;
wire    [2 :0]  mdummy3_hmain1_m3_hsize;
wire    [1 :0]  mdummy3_hmain1_m3_htrans;
wire    [31:0]  mdummy3_hmain1_m3_hwdata;
wire            mdummy3_hmain1_m3_hwrite;

wire            init_ree_ifu_en;
wire   [32-1:0] init_ree_ifu_len;
wire   [32-1:0] init_ree_ifu_pc;

assign cpu_hmain1_m0_hprot_tmp[3:0] = {{cpu_hmain1_m0_hprot[3:1]},{1'b0}};     //来自tee core 的prot信号最低位强制为低，表示来自tee core的事务
assign cpu_hmain1_m1_hprot_tmp[3:0] = {{cpu_hmain1_m1_hprot[3:1]},{1'b0}};     //来自tee core 的prot信号最低位强制为低，表示来自tee core的事务
assign cpu_hmain1_m2_hprot_tmp[3:0] = {{cpu_hmain1_m2_hprot[3:1]},{1'b0}};     //来自tee core 的prot信号最低位强制为低，表示来自tee core的事务
assign mdummy3_hmain1_m3_hprot_tmp[3:0] = mdummy3_hmain1_m3_hprot[3:0];
assign mdummy0_hmain1_m4_hprot_tmp[3:0] = mdummy0_hmain1_m4_hprot[3:0];
assign mdummy1_hmain1_m5_hprot_tmp[3:0] = mdummy1_hmain1_m5_hprot[3:0];
assign mdummy2_hmain1_m6_hprot_tmp[3:0] = mdummy2_hmain1_m6_hprot[3:0];

ahb_matrix_7_12_main
#(
  .BUS_DECODE_SEL              (1                          )
)
u_ahb_matrix_7_12_main
(
  .init_ree_ifu_en             (init_ree_ifu_en            ),
  .init_ree_ifu_len            (init_ree_ifu_len           ),
  .init_ree_ifu_pc             (init_ree_ifu_pc            ),
  
  .hclk                        (ispmu_hmain1_hclk          ),
  .hresetn                     (ispmu_hmain1_hrst_b        ),
  .m0_haddr                    (cpu_hmain1_m0_haddr        ),
  .m0_hburst                   (cpu_hmain1_m0_hburst       ),
  .m0_hgrant                   (hmain1_cpu_m0_hgrant       ),
  .m0_hprot                    (cpu_hmain1_m0_hprot_tmp    ),
  .m0_hrdata                   (hmain1_cpu_m0_hrdata       ),
  .m0_hready                   (hmain1_cpu_m0_hready       ),
  .m0_hresp                    (hmain1_cpu_m0_hresp        ),
  .m0_hsize                    (cpu_hmain1_m0_hsize        ),
  .m0_htrans                   (cpu_hmain1_m0_htrans       ),
  .m0_hwdata                   (cpu_hmain1_m0_hwdata       ),
  .m0_hwrite                   (cpu_hmain1_m0_hwrite       ),
  .m1_haddr                    (cpu_hmain1_m1_haddr        ),
  .m1_hburst                   (cpu_hmain1_m1_hburst       ),
  .m1_hgrant                   (hmain1_cpu_m1_hgrant       ),
  .m1_hprot                    (cpu_hmain1_m1_hprot_tmp    ),
  .m1_hrdata                   (hmain1_cpu_m1_hrdata       ),
  .m1_hready                   (hmain1_cpu_m1_hready       ),
  .m1_hresp                    (hmain1_cpu_m1_hresp        ),
  .m1_hsize                    (cpu_hmain1_m1_hsize        ),
  .m1_htrans                   (cpu_hmain1_m1_htrans       ),
  .m1_hwdata                   (cpu_hmain1_m1_hwdata       ),
  .m1_hwrite                   (cpu_hmain1_m1_hwrite       ),
  .m2_haddr                    (cpu_hmain1_m2_haddr        ),
  .m2_hburst                   (cpu_hmain1_m2_hburst       ),
  .m2_hgrant                   (hmain1_cpu_m2_hgrant       ),
  .m2_hprot                    (cpu_hmain1_m2_hprot_tmp    ),
  .m2_hrdata                   (hmain1_cpu_m2_hrdata       ),
  .m2_hready                   (hmain1_cpu_m2_hready       ),
  .m2_hresp                    (hmain1_cpu_m2_hresp        ),
  .m2_hsize                    (cpu_hmain1_m2_hsize        ),
  .m2_htrans                   (cpu_hmain1_m2_htrans       ),
  .m2_hwdata                   (cpu_hmain1_m2_hwdata       ),
  .m2_hwrite                   (cpu_hmain1_m2_hwrite       ),
  .m3_haddr                    (mdummy3_hmain1_m3_haddr    ),
  .m3_hburst                   (mdummy3_hmain1_m3_hburst   ),
  .m3_hgrant                   (hmain1_mdummy3_m3_hgrant   ),
  .m3_hprot                    (mdummy3_hmain1_m3_hprot_tmp),
  .m3_hrdata                   (hmain1_mdummy3_m3_hrdata   ),
  .m3_hready                   (hmain1_mdummy3_m3_hready   ),
  .m3_hresp                    (hmain1_mdummy3_m3_hresp    ),
  .m3_hsize                    (mdummy3_hmain1_m3_hsize    ),
  .m3_htrans                   (mdummy3_hmain1_m3_htrans   ),
  .m3_hwdata                   (mdummy3_hmain1_m3_hwdata   ),
  .m3_hwrite                   (mdummy3_hmain1_m3_hwrite   ),
  .m4_haddr                    (mdummy0_hmain1_m4_haddr    ),
  .m4_hburst                   (mdummy0_hmain1_m4_hburst   ),
  .m4_hgrant                   (hmain1_mdummy0_m4_hgrant   ),
  .m4_hprot                    (mdummy0_hmain1_m4_hprot_tmp),
  .m4_hrdata                   (hmain1_mdummy0_m4_hrdata   ),
  .m4_hready                   (hmain1_mdummy0_m4_hready   ),
  .m4_hresp                    (hmain1_mdummy0_m4_hresp    ),
  .m4_hsize                    (mdummy0_hmain1_m4_hsize    ),
  .m4_htrans                   (mdummy0_hmain1_m4_htrans   ),
  .m4_hwdata                   (mdummy0_hmain1_m4_hwdata   ),
  .m4_hwrite                   (mdummy0_hmain1_m4_hwrite   ),
  .m5_haddr                    (mdummy1_hmain1_m5_haddr    ),
  .m5_hburst                   (mdummy1_hmain1_m5_hburst   ),
  .m5_hgrant                   (hmain1_mdummy1_m5_hgrant   ),
  .m5_hprot                    (mdummy1_hmain1_m5_hprot_tmp),
  .m5_hrdata                   (hmain1_mdummy1_m5_hrdata   ),
  .m5_hready                   (hmain1_mdummy1_m5_hready   ),
  .m5_hresp                    (hmain1_mdummy1_m5_hresp    ),
  .m5_hsize                    (mdummy1_hmain1_m5_hsize    ),
  .m5_htrans                   (mdummy1_hmain1_m5_htrans   ),
  .m5_hwdata                   (mdummy1_hmain1_m5_hwdata   ),
  .m5_hwrite                   (mdummy1_hmain1_m5_hwrite   ),
  .m6_haddr                    (mdummy2_hmain1_m6_haddr    ),
  .m6_hburst                   (mdummy2_hmain1_m6_hburst   ),
  .m6_hgrant                   (hmain1_mdummy2_m6_hgrant   ),
  .m6_hprot                    (mdummy2_hmain1_m6_hprot_tmp),
  .m6_hrdata                   (hmain1_mdummy2_m6_hrdata   ),
  .m6_hready                   (hmain1_mdummy2_m6_hready   ),
  .m6_hresp                    (hmain1_mdummy2_m6_hresp    ),
  .m6_hsize                    (mdummy2_hmain1_m6_hsize    ),
  .m6_htrans                   (mdummy2_hmain1_m6_htrans   ),
  .m6_hwdata                   (mdummy2_hmain1_m6_hwdata   ),
  .m6_hwrite                   (mdummy2_hmain1_m6_hwrite   ),
  .s0_haddr                    (hmain1_ismc_s0_haddr       ),
  .s0_hburst                   (hmain1_ismc_s0_hburst      ),
  .s0_hprot                    (hmain1_ismc_s0_hprot       ),
  .s0_hrdata                   (ismc_hmain1_s0_hrdata      ),
  .s0_hready                   (ismc_hmain1_s0_hready      ),
  .s0_hresp                    (ismc_hmain1_s0_hresp       ),
  .s0_hselx                    (hmain1_ismc_s0_hsel        ),
  .s0_hsize                    (hmain1_ismc_s0_hsize       ),
  .s0_htrans                   (hmain1_ismc_s0_htrans      ),
  .s0_hwdata                   (hmain1_ismc_s0_hwdata      ),
  .s0_hwrite                   (hmain1_ismc_s0_hwrite      ),
  .s10_haddr                   (hmain1_ree_bus_s10_haddr   ),
  .s10_hburst                  (hmain1_ree_bus_s10_hburst  ),
  .s10_hprot                   (hmain1_ree_bus_s10_hprot   ),
  .s10_hrdata                  (ree_bus_hmain1_s10_hrdata  ),
  .s10_hready                  (ree_bus_hmain1_s10_hready  ),
  .s10_hresp                   (ree_bus_hmain1_s10_hresp   ),
  .s10_hselx                   (hmain1_ree_bus_s10_hsel    ),
  .s10_hsize                   (hmain1_ree_bus_s10_hsize   ),
  .s10_htrans                  (hmain1_ree_bus_s10_htrans  ),
  .s10_hwdata                  (hmain1_ree_bus_s10_hwdata  ),
  .s10_hwrite                  (hmain1_ree_bus_s10_hwrite  ),
  .s11_haddr                   (hmain1_dummy3_s11_haddr    ),
  .s11_hburst                  (hmain1_dummy3_s11_hburst   ),
  .s11_hprot                   (hmain1_dummy3_s11_hprot    ),
  .s11_hrdata                  (dummy3_hmain1_s11_hrdata   ),
  .s11_hready                  (dummy3_hmain1_s11_hready   ),
  .s11_hresp                   (dummy3_hmain1_s11_hresp    ),
  .s11_hselx                   (hmain1_dummy3_s11_hsel     ),
  .s11_hsize                   (hmain1_dummy3_s11_hsize    ),
  .s11_htrans                  (hmain1_dummy3_s11_htrans   ),
  .s11_hwdata                  (hmain1_dummy3_s11_hwdata   ),
  .s11_hwrite                  (hmain1_dummy3_s11_hwrite   ),
  .s1_haddr                    (hmain1_imemdummy0_s1_haddr ),
  .s1_hburst                   (hmain1_imemdummy0_s1_hburst),
  .s1_hprot                    (hmain1_imemdummy0_s1_hprot ),
  .s1_hrdata                   (imemdummy0_hmain1_s1_hrdata),
  .s1_hready                   (imemdummy0_hmain1_s1_hready),
  .s1_hresp                    (imemdummy0_hmain1_s1_hresp ),
  .s1_hselx                    (hmain1_imemdummy0_s1_hsel  ),
  .s1_hsize                    (hmain1_imemdummy0_s1_hsize ),
  .s1_htrans                   (hmain1_imemdummy0_s1_htrans),
  .s1_hwdata                   (hmain1_imemdummy0_s1_hwdata),
  .s1_hwrite                   (hmain1_imemdummy0_s1_hwrite),
  .s2_haddr                    (hmain1_smc_s2_haddr        ),
  .s2_hburst                   (hmain1_smc_s2_hburst       ),
  .s2_hprot                    (hmain1_smc_s2_hprot        ),
  .s2_hrdata                   (smc_hmain1_s2_hrdata       ),
  .s2_hready                   (smc_hmain1_s2_hready       ),
  .s2_hresp                    (smc_hmain1_s2_hresp        ),
  .s2_hselx                    (hmain1_smc_s2_hsel         ),
  .s2_hsize                    (hmain1_smc_s2_hsize        ),
  .s2_htrans                   (hmain1_smc_s2_htrans       ),
  .s2_hwdata                   (hmain1_smc_s2_hwdata       ),
  .s2_hwrite                   (hmain1_smc_s2_hwrite       ),
  .s3_haddr                    (hmain1_smc_s3_haddr        ),
  .s3_hburst                   (hmain1_smc_s3_hburst       ),
  .s3_hprot                    (hmain1_smc_s3_hprot        ),
  .s3_hrdata                   (smc_hmain1_s3_hrdata       ),
  .s3_hready                   (smc_hmain1_s3_hready       ),
  .s3_hresp                    (smc_hmain1_s3_hresp        ),
  .s3_hselx                    (hmain1_smc_s3_hsel         ),
  .s3_hsize                    (hmain1_smc_s3_hsize        ),
  .s3_htrans                   (hmain1_smc_s3_htrans       ),
  .s3_hwdata                   (hmain1_smc_s3_hwdata       ),
  .s3_hwrite                   (hmain1_smc_s3_hwrite       ),
  .s4_haddr                    (hmain1_smc_s4_haddr        ),
  .s4_hburst                   (hmain1_smc_s4_hburst       ),
  .s4_hprot                    (hmain1_smc_s4_hprot        ),
  .s4_hrdata                   (smc_hmain1_s4_hrdata       ),
  .s4_hready                   (smc_hmain1_s4_hready       ),
  .s4_hresp                    (smc_hmain1_s4_hresp        ),
  .s4_hselx                    (hmain1_smc_s4_hsel         ),
  .s4_hsize                    (hmain1_smc_s4_hsize        ),
  .s4_htrans                   (hmain1_smc_s4_htrans       ),
  .s4_hwdata                   (hmain1_smc_s4_hwdata       ),
  .s4_hwrite                   (hmain1_smc_s4_hwrite       ),
  .s5_haddr                    (hmain1_dmemdummy0_s5_haddr ),
  .s5_hburst                   (hmain1_dmemdummy0_s5_hburst),
  .s5_hprot                    (hmain1_dmemdummy0_s5_hprot ),
  .s5_hrdata                   (dmemdummy0_hmain1_s5_hrdata),
  .s5_hready                   (dmemdummy0_hmain1_s5_hready),
  .s5_hresp                    (dmemdummy0_hmain1_s5_hresp ),
  .s5_hselx                    (hmain1_dmemdummy0_s5_hsel  ),
  .s5_hsize                    (hmain1_dmemdummy0_s5_hsize ),
  .s5_htrans                   (hmain1_dmemdummy0_s5_htrans),
  .s5_hwdata                   (hmain1_dmemdummy0_s5_hwdata),
  .s5_hwrite                   (hmain1_dmemdummy0_s5_hwrite),
  .s6_haddr                    (hmain1_dummy4_s6_haddr     ),
  .s6_hburst                   (hmain1_dummy4_s6_hburst    ),
  .s6_hprot                    (hmain1_dummy4_s6_hprot     ),
  .s6_hrdata                   (dummy4_hmain1_s6_hrdata    ),
  .s6_hready                   (dummy4_hmain1_s6_hready    ),
  .s6_hresp                    (dummy4_hmain1_s6_hresp     ),
  .s6_hselx                    (hmain1_dummy4_s6_hsel      ),
  .s6_hsize                    (hmain1_dummy4_s6_hsize     ),
  .s6_htrans                   (hmain1_dummy4_s6_htrans    ),
  .s6_hwdata                   (hmain1_dummy4_s6_hwdata    ),
  .s6_hwrite                   (hmain1_dummy4_s6_hwrite    ),
  .s7_haddr                    (hmain1_dummy0_s7_haddr     ),
  .s7_hburst                   (hmain1_dummy0_s7_hburst    ),
  .s7_hprot                    (hmain1_dummy0_s7_hprot     ),
  .s7_hrdata                   (dummy0_hmain1_s7_hrdata    ),
  .s7_hready                   (dummy0_hmain1_s7_hready    ),
  .s7_hresp                    (dummy0_hmain1_s7_hresp     ),
  .s7_hselx                    (hmain1_dummy0_s7_hsel      ),
  .s7_hsize                    (hmain1_dummy0_s7_hsize     ),
  .s7_htrans                   (hmain1_dummy0_s7_htrans    ),
  .s7_hwdata                   (hmain1_dummy0_s7_hwdata    ),
  .s7_hwrite                   (hmain1_dummy0_s7_hwrite    ),
  .s8_haddr                    (hmain1_dummy1_s8_haddr     ),
  .s8_hburst                   (hmain1_dummy1_s8_hburst    ),
  .s8_hprot                    (hmain1_dummy1_s8_hprot     ),
  .s8_hrdata                   (dummy1_hmain1_s8_hrdata    ),
  .s8_hready                   (dummy1_hmain1_s8_hready    ),
  .s8_hresp                    (dummy1_hmain1_s8_hresp     ),
  .s8_hselx                    (hmain1_dummy1_s8_hsel      ),
  .s8_hsize                    (hmain1_dummy1_s8_hsize     ),
  .s8_htrans                   (hmain1_dummy1_s8_htrans    ),
  .s8_hwdata                   (hmain1_dummy1_s8_hwdata    ),
  .s8_hwrite                   (hmain1_dummy1_s8_hwrite    ),
  .s9_haddr                    (hmain1_dummy2_s9_haddr     ),
  .s9_hburst                   (hmain1_dummy2_s9_hburst    ),
  .s9_hprot                    (hmain1_dummy2_s9_hprot     ),
  .s9_hrdata                   (dummy2_hmain1_s9_hrdata    ),
  .s9_hready                   (dummy2_hmain1_s9_hready    ),
  .s9_hresp                    (dummy2_hmain1_s9_hresp     ),
  .s9_hselx                    (hmain1_dummy2_s9_hsel      ),
  .s9_hsize                    (hmain1_dummy2_s9_hsize     ),
  .s9_htrans                   (hmain1_dummy2_s9_htrans    ),
  .s9_hwdata                   (hmain1_dummy2_s9_hwdata    ),
  .s9_hwrite                   (hmain1_dummy2_s9_hwrite    )
);

ahbm_dummy_top  u_main_mdummy_top0 (
  .hclk                     (ispmu_mdummy0_hclk      ),
  .hrst_b                   (ispmu_mdummy0_hrst_b    ),
  .mhaddr                   (mdummy0_hmain1_m4_haddr ),
  .mhburst                  (mdummy0_hmain1_m4_hburst),
  .mhgrant                  (hmain1_mdummy0_m4_hgrant),
  .mhprot                   (mdummy0_hmain1_m4_hprot ),
  .mhrdata                  (hmain1_mdummy0_m4_hrdata),
  .mhready                  (hmain1_mdummy0_m4_hready),
  .mhresp                   (hmain1_mdummy0_m4_hresp ),
  .mhsize                   (mdummy0_hmain1_m4_hsize ),
  .mhtrans                  (mdummy0_hmain1_m4_htrans),
  .mhwdata                  (mdummy0_hmain1_m4_hwdata),
  .mhwrite                  (mdummy0_hmain1_m4_hwrite)
);

ahbm_dummy_top  u_main_mdummy_top1 (
  .hclk                     (ispmu_mdummy1_hclk      ),
  .hrst_b                   (ispmu_mdummy1_hrst_b    ),
  .mhaddr                   (mdummy1_hmain1_m5_haddr ),
  .mhburst                  (mdummy1_hmain1_m5_hburst),
  .mhgrant                  (hmain1_mdummy1_m5_hgrant),
  .mhprot                   (mdummy1_hmain1_m5_hprot ),
  .mhrdata                  (hmain1_mdummy1_m5_hrdata),
  .mhready                  (hmain1_mdummy1_m5_hready),
  .mhresp                   (hmain1_mdummy1_m5_hresp ),
  .mhsize                   (mdummy1_hmain1_m5_hsize ),
  .mhtrans                  (mdummy1_hmain1_m5_htrans),
  .mhwdata                  (mdummy1_hmain1_m5_hwdata),
  .mhwrite                  (mdummy1_hmain1_m5_hwrite)
);

ahbm_dummy_top  u_main_mdummy_top2 (
  .hclk                     (ispmu_mdummy2_hclk      ),
  .hrst_b                   (ispmu_mdummy2_hrst_b    ),
  .mhaddr                   (mdummy2_hmain1_m6_haddr ),
  .mhburst                  (mdummy2_hmain1_m6_hburst),
  .mhgrant                  (hmain1_mdummy2_m6_hgrant),
  .mhprot                   (mdummy2_hmain1_m6_hprot ),
  .mhrdata                  (hmain1_mdummy2_m6_hrdata),
  .mhready                  (hmain1_mdummy2_m6_hready),
  .mhresp                   (hmain1_mdummy2_m6_hresp ),
  .mhsize                   (mdummy2_hmain1_m6_hsize ),
  .mhtrans                  (mdummy2_hmain1_m6_htrans),
  .mhwdata                  (mdummy2_hmain1_m6_hwdata),
  .mhwrite                  (mdummy2_hmain1_m6_hwrite)
);

//将原接于DMA的主机端口m3替换为dummy
ahbm_dummy_top  u_main_mdummy_top3 (
  .hclk                     (ispmu_mdummy3_hclk      ),
  .hrst_b                   (ispmu_mdummy3_hrst_b    ),
  .mhaddr                   (mdummy3_hmain1_m3_haddr ),
  .mhburst                  (mdummy3_hmain1_m3_hburst),
  .mhgrant                  (hmain1_mdummy3_m3_hgrant),
  .mhprot                   (mdummy3_hmain1_m3_hprot ),
  .mhrdata                  (hmain1_mdummy3_m3_hrdata),
  .mhready                  (hmain1_mdummy3_m3_hready),
  .mhresp                   (hmain1_mdummy3_m3_hresp ),
  .mhsize                   (mdummy3_hmain1_m3_hsize ),
  .mhtrans                  (mdummy3_hmain1_m3_htrans),
  .mhwdata                  (mdummy3_hmain1_m3_hwdata),
  .mhwrite                  (mdummy3_hmain1_m3_hwrite)
);

ahb_dummy_top  u_main_imemdummy_top0 (
  .haddr                       (hmain1_imemdummy0_s1_haddr ),
  .hclk                        (ispmu_imemdummy0_hclk      ),
  .hprot                       (hmain1_imemdummy0_s1_hprot ),
  .hrdata                      (imemdummy0_hmain1_s1_hrdata),
  .hready                      (imemdummy0_hmain1_s1_hready),
  .hresp                       (imemdummy0_hmain1_s1_hresp ),
  .hrst_b                      (ispmu_imemdummy0_hrst_b    ),
  .hsel                        (hmain1_imemdummy0_s1_hsel  ),
  .hsize                       (hmain1_imemdummy0_s1_hsize ),
  .htrans                      (hmain1_imemdummy0_s1_htrans),
  .hwdata                      (hmain1_imemdummy0_s1_hwdata),
  .hwrite                      (hmain1_imemdummy0_s1_hwrite),
  .intr                        (main_imemdummy0_intr       )
);


`ASCON_HASH_TOP
u_ascon_hash_top
(
    .ascon_hash_clk_i                  (ispmu_dmemdummy0_hclk                  ),
    .ascon_hash_rst_n_i                (ispmu_dmemdummy0_hrst_b                ),
//与interface相连
    .haddr_i                           (hmain1_dmemdummy0_s5_haddr             ),               
    .hprot_i                           (hmain1_dmemdummy0_s5_hprot             ),               
    .hsel_i                            (hmain1_dmemdummy0_s5_hsel              ),              
    .hsize_i                           (hmain1_dmemdummy0_s5_hsize             ),               
    .htrans_i                          (hmain1_dmemdummy0_s5_htrans            ),                
    .hwdata_i                          (hmain1_dmemdummy0_s5_hwdata            ),                
    .hwrite_i                          (hmain1_dmemdummy0_s5_hwrite            ),                
    .hrdata_o                          (dmemdummy0_hmain1_s5_hrdata            ),                
    .hready_o                          (dmemdummy0_hmain1_s5_hready            ),                
    .hresp_o                           (dmemdummy0_hmain1_s5_hresp             ),               
    .intr_o                            (main_dmemdummy0_intr                   )              
);


`ASCON_AEAD_EN_TOP
u_ascon_aead_en_top
(
     .ascon_aead_clk_i                 (ispmu_dummy4_hclk                      ),
     .ascon_aead_rst_n_i               (ispmu_dmemdummy0_hrst_b                ),
//与interface相连                  
     .haddr_i                          (hmain1_dummy4_s6_haddr                 ),            
     .hprot_i                          (hmain1_dummy4_s6_hprot                 ),            
     .hsel_i                           (hmain1_dummy4_s6_hsel                  ),           
     .hsize_i                          (hmain1_dummy4_s6_hsize                 ),            
     .htrans_i                         (hmain1_dummy4_s6_htrans                ),             
     .hwdata_i                         (hmain1_dummy4_s6_hwdata                ),             
     .hwrite_i                         (hmain1_dummy4_s6_hwrite                ),             
     .hrdata_o                         (dummy4_hmain1_s6_hrdata                ),             
     .hready_o                         (dummy4_hmain1_s6_hready                ),             
     .hresp_o                          (dummy4_hmain1_s6_hresp                 ),            
     .intr_o                           (main_dummy4_intr                       )           
);                  

`ASCON_AEAD_DE_TOP
u_ascon_aead_de_top
(
     .ascon_aead_clk_i                 (ispmu_dummy0_hclk                      ),
     .ascon_aead_rst_n_i               (ispmu_dmemdummy0_hrst_b                ),
//与interface相连                  
     .haddr_i                          (hmain1_dummy0_s7_haddr                 ),            
     .hprot_i                          (hmain1_dummy0_s7_hprot                 ),            
     .hsel_i                           (hmain1_dummy0_s7_hsel                  ),           
     .hsize_i                          (hmain1_dummy0_s7_hsize                 ),            
     .htrans_i                         (hmain1_dummy0_s7_htrans                ),             
     .hwdata_i                         (hmain1_dummy0_s7_hwdata                ),             
     .hwrite_i                         (hmain1_dummy0_s7_hwrite                ),             
     .hrdata_o                         (dummy0_hmain1_s7_hrdata                ),             
     .hready_o                         (dummy0_hmain1_s7_hready                ),             
     .hresp_o                          (dummy0_hmain1_s7_hresp                 ),            
     .intr_o                           (main_dummy0_intr                       )           
);  
iopmp_config_top u_iopmp_config_top(
    .iopmpcfg_clk_i        (ispmu_dummy1_hclk      ) ,
    .iopmpcfg_rst_n_i      (ispmu_dummy1_hrst_b    ) ,
    .iopmpcfg_haddr_i      (hmain1_dummy1_s8_haddr ) ,
    .iopmpcfg_hprot_i      (hmain1_dummy1_s8_hprot ) ,
    .iopmpcfg_hsel_i       (hmain1_dummy1_s8_hsel  ) ,
    .iopmpcfg_hsize_i      (hmain1_dummy1_s8_hsize ) ,
    .iopmpcfg_htrans_i     (hmain1_dummy1_s8_htrans) ,
    .iopmpcfg_hwdata_i     (hmain1_dummy1_s8_hwdata) ,
    .iopmpcfg_hwrite_i     (hmain1_dummy1_s8_hwrite) ,

    .iopmpcfg_rd1_i        (iopmpcfg_rd1_i         ),
    .iopmpcfg_rd2_i        (iopmpcfg_rd2_i         ),
    .iopmpcfg_rd3_i        (iopmpcfg_rd3_i         ),

    .iopmpcfg_hrdata_o     (dummy1_hmain1_s8_hrdata),
    .iopmpcfg_hready_o     (dummy1_hmain1_s8_hready),
    .iopmpcfg_hresp_o      (dummy1_hmain1_s8_hresp ),
    .iopmpcfg_intr_o       (main_dummy1_intr       ),

    .iopmpcfg_node_clk_o   (iopmpcfg_node_clk_o    ),
    .iopmpcfg_node_rstn_o  (iopmpcfg_node_rstn_o   ),
    .iopmpcfg_cfg_en_o     (iopmpcfg_cfg_en_o      ),
    .iopmpcfg_node_addr_o  (iopmpcfg_node_addr_o   ),
    .iopmpcfg_node_wen_o   (iopmpcfg_node_wen_o    ),
    .iopmpcfg_node_ren_o   (iopmpcfg_node_ren_o    ),
    .iopmpcfg_node_wdata_o (iopmpcfg_node_wdata_o  )
);

// ahb_dummy_top  u_main_dummy_top1 (
//   .haddr                   (hmain1_dummy1_s8_haddr ),
//   .hclk                    (ispmu_dummy1_hclk      ),
//   .hprot                   (hmain1_dummy1_s8_hprot ),
//   .hrdata                  (dummy1_hmain1_s8_hrdata),
//   .hready                  (dummy1_hmain1_s8_hready),
//   .hresp                   (dummy1_hmain1_s8_hresp ),
//   .hrst_b                  (ispmu_dummy1_hrst_b    ),
//   .hsel                    (hmain1_dummy1_s8_hsel  ),
//   .hsize                   (hmain1_dummy1_s8_hsize ),
//   .htrans                  (hmain1_dummy1_s8_htrans),
//   .hwdata                  (hmain1_dummy1_s8_hwdata),
//   .hwrite                  (hmain1_dummy1_s8_hwrite),
//   .intr                    (main_dummy1_intr       )
// );

ahb_dummy_top  u_main_dummy_top2 (
  .haddr                   (hmain1_dummy2_s9_haddr ),
  .hclk                    (ispmu_dummy2_hclk      ),
  .hprot                   (hmain1_dummy2_s9_hprot ),
  .hrdata                  (dummy2_hmain1_s9_hrdata),
  .hready                  (dummy2_hmain1_s9_hready),
  .hresp                   (dummy2_hmain1_s9_hresp ),
  .hrst_b                  (ispmu_dummy2_hrst_b    ),
  .hsel                    (hmain1_dummy2_s9_hsel  ),
  .hsize                   (hmain1_dummy2_s9_hsize ),
  .htrans                  (hmain1_dummy2_s9_htrans),
  .hwdata                  (hmain1_dummy2_s9_hwdata),
  .hwrite                  (hmain1_dummy2_s9_hwrite),
  .intr                    (main_dummy2_intr       )
);

ahb_dummy_top  u_main_dummy_top3 (
  .haddr                    (hmain1_dummy3_s11_haddr ),
  .hclk                     (ispmu_dummy3_hclk       ),
  .hprot                    (hmain1_dummy3_s11_hprot ),
  .hrdata                   (dummy3_hmain1_s11_hrdata),
  .hready                   (dummy3_hmain1_s11_hready),
  .hresp                    (dummy3_hmain1_s11_hresp ),
  .hrst_b                   (ispmu_dummy3_hrst_b     ),
  .hsel                     (hmain1_dummy3_s11_hsel  ),
  .hsize                    (hmain1_dummy3_s11_hsize ),
  .htrans                   (hmain1_dummy3_s11_htrans),
  .hwdata                   (hmain1_dummy3_s11_hwdata),
  .hwrite                   (hmain1_dummy3_s11_hwrite),
  .intr                     (main_dummy3_intr        )
);

//将原接于DMA的从机端s6替换为dummy
// ahb_dummy_top  u_main_dummy_top4 (
//   .haddr                    (hmain1_dummy4_s6_haddr ),
//   .hclk                     (ispmu_dummy4_hclk      ),
//   .hprot                    (hmain1_dummy4_s6_hprot ),
//   .hrdata                   (dummy4_hmain1_s6_hrdata),
//   .hready                   (dummy4_hmain1_s6_hready),
//   .hresp                    (dummy4_hmain1_s6_hresp ),
//   .hrst_b                   (ispmu_dummy4_hrst_b    ),
//   .hsel                     (hmain1_dummy4_s6_hsel  ),
//   .hsize                    (hmain1_dummy4_s6_hsize ),
//   .htrans                   (hmain1_dummy4_s6_htrans),
//   .hwdata                   (hmain1_dummy4_s6_hwdata),
//   .hwrite                   (hmain1_dummy4_s6_hwrite),
//   .intr                     (main_dummy4_intr       )
// );


endmodule
